const fs = require("fs");
const path = require("path");

async function handler(){
    async_fun();
    sync_fun();
    callback(cb);
}

async function async_fun() {
    fs.readFile(path.join(__dirname,"jest-e2e.json"),function (err,data){
        console.log("async \n"+data);
    });
}

function sync_fun(){
    console.log("sync");
}

function callback(cb){
    console.log("cb");
    if(cb){
        cb();
    }
}

function cb(){
    console.log("cb called");
}

async function main(){
  handler();
}

main();